package com.fang.modules.web02.controller;

import com.fang.modules.server.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author Bernie_fang
 * @Date 2022/12/4 23:01
 **/
@RestController
public class HelloWeb02Controller {

    @Value("${com.fang.a}")
    private String message;

    @Autowired
    private HelloService service;

    @GetMapping(value = "helloWeb02")
    public String hello() {
        return "hello web 02: " + message;
    }

    @GetMapping(value = "callHelloService02")
    public String helloService() {
        return service.helloService("02");
    }


}
